package com.ibeeking.found.system.api.feign;

import com.ibeeking.found.system.api.common.param.RefreshTokenParam;
import com.ibeeking.found.system.api.feign.fallback.UaaBClientFallbackFactory;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author ibeeking
 */
@FeignClient(name = "base-uaa-b-server", contextId = "gatewayUaaBClient", fallbackFactory = UaaBClientFallbackFactory.class, decode404 = true)
public interface UaaBClient {

    /**
     * 刷新token
     *
     * @param refreshTokenParam
     * @return
     */
    @PostMapping(value = "/uaa/v1/oauth/refreshToken")
    ResponseResult<String> refreshToken(@RequestBody RefreshTokenParam refreshTokenParam);
}
